﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OrangePrj
{
    public class WorkItem : System.Windows.Forms.ListViewItem
    {
        private Work work = null;

        public WorkItem(Work w)
        {
            work = w;
            string dependeses = String.Empty;

            base.Text = work.Name;
            base.SubItems.Add(work.Description);
            foreach (Work depWork in work.DepWorks)
            {
                dependeses += depWork.Name + ", ";
            }
            base.SubItems.Add(dependeses);
            base.SubItems.Add(work.Time.ToString());
            base.SubItems.Add(work.Resource.Amount.ToString());

        }
    }
}
